package com.young.springdemo.service.commandchain;

public class VicePrident extends Approve {
    public VicePrident(String name) {
        super(name);
    }

    @Override
    protected void processRequest(PurchaseRequest purchaseRequest) {
        if (500 > purchaseRequest.getPrice() && purchaseRequest.getPrice() > 200 ){
            System.out.println(this.name+"处理价格为"+purchaseRequest.getPrice()+"的商品名为:"+purchaseRequest.getGoodsName());
        }else {
            this.success.processRequest(purchaseRequest);
        }
    }
}
